import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

class GroupTitleForm extends StatelessWidget {
  final String title;
  final String title2;

  const GroupTitleForm({
    Key key,
    this.title,
    this.title2,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(
        left: getDp(35),
        right: getDp(35),
        top: getDp(15),
        bottom: getDp(15),
      ),
      decoration: BoxDecoration(
        border:
            Border(bottom: BorderSide(color: aceGrayColor, width: getDp(0.5))),
      ),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Text(
            title,
            style: TextStyle(
              color: aceBlackColor,
              fontSize: getSp(18),
              fontWeight: FontWeight.w700,
              height: 18 / 14,
            ),
          ),
          if (title2 != null)
            Text(
              title2,
              style: TextStyle(
                color: aceBlackColor,
                fontSize: getSp(18),
                fontWeight: FontWeight.w700,
                height: 18 / 14,
              ),
            ),
        ],
      ),
    );
  }

  @override
  void debugFillProperties(DiagnosticPropertiesBuilder properties) {
    super.debugFillProperties(properties);
    properties.add(StringProperty('title', title));
  }
}
